import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
// import './permission' // permission
import uView from '@/uni_modules/uview-ui'
import TopNav from './components/top-navigation'
import Empty from '@/components/empty/index.vue'
import Toast from '@/components/toast/index.vue'
import initToast from "@/components/toast/initToast.js"
// import Vant from "@/node_modules/vant";
//注意这里引入的是less文件而不是css文件，引入css文件会导致控制台报错无法编译成功
// import './node_modules/vant/lib/vant/lib/index.less'
// Vue.use(Vant)
import { debuggerModule } from 'uni_modules/imengyu-IMDebuggerWindow/common/debuggerExtern.js'

const errorHandler = (err, vm, info) => { 
  if(debuggerModule) debuggerModule.addVueError(err, vm, info);
}

Vue.config.errorHandler = errorHandler;  

Vue.use(uView)
Vue.use(plugins)
initToast(Vue);
Vue.component('TopNav', TopNav)
Vue.component('Empty', Empty)
Vue.component('Toast', Toast)
Vue.config.productionTip = false
Vue.prototype.$store = store

App.mpType = 'app'

const app = new Vue({
	...App
})

app.$mount()